package com.zhl.media.commonsdk.data;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.orhanobut.hawk.Hawk;
import com.zhl.media.commonsdk.entity.Token;
import com.zhl.media.commonsdk.entity.User;

import java.util.List;

/**
 * alan
 */
public class UserUtil {

    public static Token getTokenInfo() {
        return Hawk.get("token");
    }

    public static void setTokenInfo(Token tokenInfo){
        Hawk.put("token", tokenInfo);
    }

    public static void setAdjust(Boolean b){
        Hawk.put("adjust", b);
    }

    public static Boolean getAdjust(){
        return Hawk.get("adjust",false);
    }

    public static void saveOldAcount(String acount) {
        Hawk.put("OldAcount", acount);
    }

    public static String getOldAcount() {
        return Hawk.get("OldAcount");
    }

    public static void saveOldPass(String pass) {
        Hawk.put("OldPass", pass);
    }

    public static String getOldPass() {
        return Hawk.get("OldPass");
    }

    public static User getUser() {
        return Hawk.get("user");
    }

    public static void setUser(User user) {
        Hawk.put("user", user);
    }

    public static void setLoginStatus(Boolean b){
        Hawk.put("loginStatus", b);
    }

    public static Boolean getLoginStatus(){
        return Hawk.get("loginStatus",false);
    }
}
